home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / game / patch / WHDIGamesA-B.lzh / BrutalFootball.lha / BrutalFootballHD / Install_CD < prev    next >
Text File  |  2000-12-27  |  3KB  |  157 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "data")        ;sub directory containing data files
  4. (set #readme-file "BrutalFootball.readme")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  20.   )
  21. )
  22.  
  23. ;----------------------------
  24. ; Wait for inserting disk
  25. ; IN:  #AD_disk - name of disk
  26. ; OUT: -
  27.  
  28. (procedure P_disk
  29.   (askdisk
  30.     (dest #AD_disk)
  31.     (prompt ("\nInsert \"%s\" CD-ROM in any drive !" #AD_disk))
  32.     (help @askdisk-help)
  33.   )
  34. )
  35.  
  36.  
  37. ;****************************
  38.  
  39. (if
  40.   (exists #readme-file)
  41.   (if 
  42.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  43.     ("")
  44.     (run ("SYS:Utilities/More %s" #readme-file))
  45.   )
  46. )
  47.  
  48. (set #program "WHDLoad")
  49. (P_chkrun)
  50.  
  51. (set @default-dest
  52.   (askdir
  53.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  54.     (help @askdir-help)
  55.     (default @default-dest)
  56.     (disk)
  57.   )
  58. )
  59. (set #dest (tackon @default-dest @app-name))
  60. (if
  61.   (exists #dest)
  62.   (
  63.     (set #choice
  64.       (askbool
  65.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  66.         (default 1)
  67.         (choices "Delete" "Skip")
  68.         (help @askbool-help)
  69.       )
  70.     )
  71.     (if
  72.       (= #choice 1)
  73.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  74.     )
  75.   )
  76. )
  77. (makedir #dest
  78.   (help @makedir-help)
  79.   (infos)
  80. )
  81.  
  82. ;----------------------------
  83.  
  84. (copyfiles
  85.   (help @copyfiles-help)
  86.   (source ("%s.slave" @app-name))
  87.   (dest #dest)
  88. )
  89.  
  90. (if
  91.   (exists ("%s.newicon" @app-name))
  92.   (set #icon
  93.     (askchoice
  94.       (prompt "\nWhich icon do you like to install ?\n")
  95.       (default 0)
  96.       (choices "Normal" "NewIcon")
  97.       (help @askchoice-help)
  98.     )
  99.   )
  100.   (set #icon 0)
  101. )
  102. (select #icon
  103.   (set #icon ("%s.inf" @app-name))
  104.   (set #icon ("%s.newicon" @app-name))
  105. )
  106. (copyfiles
  107.   (help @copyfiles-help)
  108.   (source #icon)
  109.   (newname ("%s.info" @app-name))
  110.   (dest #dest)
  111. )
  112. (if
  113.   (exists #readme-file)
  114.   (copyfiles
  115.     (help @copyfiles-help)
  116.     (source #readme-file)
  117.     (dest #dest)
  118.   )
  119. )
  120. (if
  121.   (exists ("%s.info" #readme-file))
  122.   (copyfiles
  123.     (help @copyfiles-help)
  124.     (source ("%s.info" #readme-file))
  125.     (dest #dest)
  126.   )
  127. )
  128.  
  129. (if
  130.   (= #sub-dir "")
  131.   ("")
  132.   (
  133.     (set #dest (tackon #dest #sub-dir))
  134.     (makedir #dest
  135.       (help @makedir-help)
  136.     )
  137.   )
  138. )
  139.  
  140. (copyfiles
  141.   (help @copyfiles-help)
  142.   (source ("OSEmu.400" @app-name))
  143.   (dest #dest)
  144. )
  145.  
  146. ;----------------------------
  147.  
  148. (set #AD_disk "Game32")
  149. (P_disk)
  150.  
  151. (copyfiles
  152.   (help @copyfiles-help)
  153.   (source ("%s:" #AD_disk))
  154.   (dest #dest)
  155.   (pattern "~(s|c|cd32head|logo.cdxl|blankscn)")
  156. )
  157.